package com.cn.web.user.vo;

import com.cn.common.IDGenerate;
import com.cn.empty.EmptyCheck;
import com.cn.empty.EmptyCheckObject;
import com.cn.group.GroupDO;
import com.cn.phone.IPhoneCheck;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * description: UserEditDTO <br>
 * date: 21.12.14 13:44 <br>
 * author: cn_yaojin <br>
 * version: 1.0 <br>
 */
@Setter
@Getter
@Accessors(chain = true)
@ApiModel(value = "用户信息编辑")
public class UserEditDTO extends IDGenerate {

    //业务中台用户主键
    private String userId;

    @ApiModelProperty(value = "用户名")
    private String accountName;

    @ApiModelProperty(value = "昵称")
    private String nickName;

    @ApiModelProperty(value = "性别")
    private String gender;

    @ApiModelProperty(value = "民族")
    private String nation;

    @ApiModelProperty(value = "学历")
    private String edu;

    @ApiModelProperty(value = "学校")
    private String school;

    @EmptyCheck(message = "姓名不能为空", max = 30)
    @ApiModelProperty(value = "姓名")
    private String userName;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @IPhoneCheck
    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "身份证号")
    private String cardNum;

    @ApiModelProperty(value = "工号")
    private String workNum;

    @ApiModelProperty(value = "职位")
    private String workPost;

    @ApiModelProperty(value = "0-正常 1-停用")
    private String userStatus;

    @ApiModelProperty(value = "头像")
    private String photo;

    @ApiModelProperty(value = "出生日期")
    private String birthday;

    @ApiModelProperty(hidden = true, value = "0-超管用户")
    private String adminFlag;

    @ApiModelProperty(value = "角色ID")
    private List<UserVO.UserRoles> roleIds;

    @ApiModelProperty(value = "机构ID")
    private List<UserVO.UserUnits> orgIds;

    @ApiModelProperty(value = "用户分组")
    private List<GroupDO> groupId;

    @ApiModelProperty(value = "子账号信息")
    private List<UserChildAccountDO> child;

    @Setter
    @Getter
    @Accessors(chain = true)
    public static class AddRole2User {
        @EmptyCheckObject(message = "人员Id不能为空")
        @ApiModelProperty(value = "人员ID")
        private String userId;

        @ApiModelProperty(value = "角色ID")
        private List<UserVO.UserRoles> roleIds;
    }
}
